package com.wego.domain.query;

import com.wego.bean.base.BaseQuery;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * 评论查询对象
 * @author hc
 * @date 2025-09-09 14:29
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class CommentQuery extends BaseQuery {
    /**
     * 主键
     */
    private Integer id;
    /**
     * 评论内容
     */
    private String content;

    /**
     * 外键，评论用户ID
     */
    private Integer userId;

    /**
     * 外键，所属文章ID
     */
    private Integer strategyId;

    /**
     * 自关联外键，父评论ID(用于回复功能，NULL表示顶级评论)
     */
    private Integer parentId;

    /**
     * 点赞数
     */
    private Integer likeCount;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate begin; //时间-开始
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate end; //时间-结束
}